<div  class=" admin-content">
    <div class="admin-biaogelist">

        <div class="listbiaoti am-cf">
            <ul class="am-icon-users">{{title}}</ul>

            <dl class="am-icon-home" style="float: right;">当前位置： 首页 > <a href="#">在职员工</a></dl>
            <dl>
                <button type="button" id="addEmployee" ng-click="openAddEmpModal()" class="am-btn am-btn-success am-round am-btn-xs am-icon-plus" > 员工入职</button>
            </dl>
            <!--<dl>
                <button type="button" id="SelectEmployee" ng-click="openSelectEmpModal()" class="am-btn am-btn-success am-round am-btn-xs am-icon-plus" > 查询员工</button>
            </dl>-->
            <dl>
                <label>名字</label>
                <input type="text" class="input-small" ng-model="empWhere.name" id="selectEmpName"
                       placeholder="名字">
            </dl>
            <dl>
                <label>工号</label>
                <input type="text" class="input-small" ng-model="empWhere.jobnum" id="selectEmpJobnum"
                       placeholder="工号">
            </dl>
            <dl>
                <button type="submit" class="btn btn-default" ng-click="selectEmpByWhere(empWhere)">查询</button>
            </dl>
            <!--这里打开的是新页面-->
</div>
<form class="am-form am-g">
            <table width="100%" class="am-table am-table-bordered am-table-radius am-table-striped">
                <thead>
                <tr class="am-success">
                    <th class="table-check"><input type="checkbox" /></th>

                    <th class="table-id">序号</th>
                    <th class="table-id">工号</th>
                    <th class="table-title">姓名</th>
                    <th class="table-title">部门</th>
                    <th class="table-title">岗位</th>
                    <th class="table-date am-hide-sm-only">联系方式</th>
                    <th class="table-title">上级姓名</th>
                    <th class="table-title">上级手机</th>
                    <th class="table-title">上级邮箱</th>
                    <th class="table-date am-hide-sm-only">附件</th>
                    <th class="table-date am-hide-sm-only">操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="item in emplist">
                    <td><input type="checkbox" /></td>

                    <td>{{item.number}}</td>
                    <td>{{item.jobnum}}</td>
                    <td>{{item.name}}</td>
                    <td class="am-hide-sm-only">{{item.depart.name}}</td>
                    <td class="am-hide-sm-only">{{item.post}}</td>
                    <td class="am-hide-sm-only">{{item.phone}}</td>
                    <td class="am-hide-sm-only">{{item.depart.manager_name}}</td>
                    <td class="am-hide-sm-only">{{item.depart.phone}}</td>
                    <td class="am-hide-sm-only">{{item.depart.email}}</td>
                    <td class="am-hide-sm-only"><img ng-src="upload/1.png" /></td>
                    <td>
                        <div class="am-btn-toolbar">
                            <div class="am-btn-group am-btn-group-xs">
                                <button ng-click="selectEmp(item.id)" class="am-btn am-btn-default am-btn-xs am-text-secondary am-round" data-am-modal="{target: '#my-popups'}" title="修改"><span class="am-icon-pencil-square-o" ></span></button>
                            </div>
                        </div>
                    </td>
                </tr>

                </tbody>
            </table>
        <!--分页页码-->
        <ul class="am-pagination am-fr">
            <div class="box-footer no-border">
                 <pagination-component total-items="list.totalCounts"
	                                  current-page="list.pageIndex"
	                                  page-size="list.pageSize"
	                                  select-page="NextListData(pageIndex)">
                 </pagination-component>
            </div>
         </ul>
            <div class="am-btn-group am-btn-group-xs">

            </div>
            <hr />
            <!--<p>注：.....</p>-->
</form>

</div>

</div>
</div>




<div class="modal fade" id="addEmpModal"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="z-index:9999;">
        <div class="modal-content">
            <div class="modal-header">

                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>

                <h4 class="modal-title" id="empModalLabel">

                    员工信息填写
                </h4>
            </div>
            <div class="modal-body">
                <form role="form">
                    <div class="form-group">
                        <label >序号</label>
                        <input type="text" ng-model="addEmpData.number" class="form-control"
                               placeholder="序号">
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label >工号</label>
                        <input type="text" ng-model="addEmpData.jobnum" class="form-control"
                               placeholder="工号">
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label >名字</label>
                        <input ng-model="addEmpData.name" type="text" class="form-control"

                               placeholder="名字">
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label >部门</label>
                        <select ng-options="d.name for d in departList" ng-model="depart" class="form-control">
                        </select>
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label>岗位</label>
                        <input ng-model="addEmpData.post" type="text" class="form-control"
                               placeholder="岗位">
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label>联系方式</label>
                        <input ng-model="addEmpData.phone" type="text" class="form-control"
                               placeholder="联系方式">
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label>上级姓名</label>
                        <input ng-model="depart.manager_name" type="text" class="form-control"
                               placeholder="上级姓名">
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label>上级手机</label>
                        <input ng-model="depart.phone" type="text" class="form-control"
                               placeholder="上级手机">
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label>上级邮箱</label>
                        <input ng-model="depart.email" type="text" class="form-control"
                               placeholder="上级邮箱">
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label>附件</label>
                        <input ng-model="addEmpData.d_email" type="text" class="form-control"
                               placeholder="附件">
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label for="newPhotoFile">附件</label>
                        <input type="file" id="newPhotoFile" name="file">
                        <p class="help-block">这里上传!!</p>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>

                <button type="button" id="addEmp" ng-click="addEmp(addEmpData,depart)" class="btn btn-primary">

                 		   提交
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>



<div class="modal fade" id="EmpModal"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="z-index:9999;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="nodeModalLabel">

              	   	员工信息修改

                </h4>
            </div>
            <div class="modal-body">
                <form role="form">
                    <div class="form-group">
                        <label>序号</label>
                        <input type="text" class="form-control" id="number"
                               placeholder="序号" ng-model="Emp.number">
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label>工号</label>
                        <input type="text" class="form-control"
                               placeholder="工号"  ng-model="Emp.jobnum" id="jobnum">
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label>姓名</label>
                        <input type="text" class="form-control"
                               placeholder="姓名"  ng-model="Emp.name" id="name">
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label>部门</label>
                        <select ng-options="d.name for d in departList" ng-model="updateDepart" class="form-control">
                        </select>
                        <input type="hidden" class="form-control" >
                    </div>
                    <div class="form-group">
                        <label >岗位</label>
                        <input type="text" ng-model="Emp.post" class="form-control"
                               placeholder="岗位">
                        <input type="hidden"  class="form-control" >
                    </div>
                    <div class="form-group">
                        <label >联系方式</label>
                        <input type="text" ng-model="Emp.phone" class="form-control"
                               placeholder="联系方式">
                        <input type="hidden"  class="form-control" >
                    </div>
                    <div class="form-group">
                        <label >上级姓名</label>
                        <input ng-model="updateDepart.manager_name" type="text" class="form-control"
                               placeholder="上级姓名">
                        <input type="hidden" class="form-control" >
                    </div>
                    <!--<div class="form-group">-->
                        <!--<label>照片</label>-->

                        <!--<input type="file" >-->
                        <!--<p class="help-block">这里上传</p>-->
                    <!--</div>-->
                    <div>
                        <label >上级手机</label>
                        <input ng-model="updateDepart.phone" type="text" class="form-control"
                               placeholder="上级手机">
                        <input type="hidden" class="form-control" >
                    </div>
                      <div class="form-group">
                          <label >上级邮箱</label>
                          <input ng-model="updateDepart.email" type="text" class="form-control"
                                 placeholder="上级邮箱">
                          <input type="hidden" class="form-control" >
                         <!-- <div class="am-form-group am-cf">
                              <div ng-if="Emp.state==1" class="you" style="margin-top: 5px;">
                                  <label class="am-checkbox-inline">
                                      <input type="radio" checked='true' ng-model="Emp.state" name="state" value="1">
                                      在职</label>
                                  <label class="am-checkbox-inline">
                                      <input type="radio" ng-model="Emp.state"  name="state" value="0">
                                      离职</label>
                              </div>
                              <div ng-if="Emp.state==0" class="you" style="margin-top: 5px;">
                                  <label class="am-checkbox-inline">
                                      <input type="radio"  ng-model="Emp.state"    name="state1" value="1">
                                      在职</label>
                                  <label class="am-checkbox-inline">
                                      <input type="radio"  ng-model="Emp.state" checked='true' name="state1" value="0">
                                      离职</label>
                              </div>
                          </div>-->
                    </div>
                    <div>
                        <label>附件</label>
                        <a>附件</a>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>

                <button type="button" id="SelectEmpDataSubmit"  ng-click="Update(Emp,updateDepart)" class="btn btn-primary">

                    	更新
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
